<?php
error_reporting(0);
//error_reporting(E_ALL);
define ( 'MYSQL_HOST', 'localhost' );
define ( 'MYSQL_USER', 'dbu1153130' );
define ( 'MYSQL_PASSWORD', 'testokI040336' );
define ( 'MYSQL_DATABASE', 'db1153130-testdb2' );

if  ( !$_SERVER["SERVER_NAME"] or $_SERVER["SERVER_NAME"]=="localhost")
{
	$db_link = mysql_connect ("localhost", "root", "");
	mysql_select_db( "test" ) or die("Error database access");
}
else 
{
	$db_link = mysql_connect (MYSQL_HOST, MYSQL_USER, MYSQL_PASSWORD);
	mysql_select_db( MYSQL_DATABASE ) or die("Error database access");
}

if ( ! $db_link )
{
    $empfaenger = "support@lingomoto.com";
    $absender   = "support@lingomoto.com";
    $betreff    = "Abbruch Datenbank-Verbindung". mysql_error();
    $antwortan  = "support@lingomoto.com";

    mail( $empfaenger,
        $betreff,
        $mailtext,
        "From: $absender\nReply-To: $antwortan",
        "-f $absender");
        
    die('keine Verbindung möglich: ' . mysql_error());
} 
//mysql_close($db_link );
mysql_query("SET NAMES 'utf8'"); //COLLATE 'utf8_unicode_ci'");
mysql_query('SET CHARACTER SET utf8');
?>